Update Work Request
Introduction
The Assetic REST API PUT /api/v2/workrequest/{id} allows a work request to be updated, where "id" is the unique work request GUID.
Use the Assetic REST API GET /api/v2/workrequest/{id} to get the request, as described in the article Get Request Details. Next update the values for the keys you wish to change and then apply the changes via PUT /api/v2/workrequest/{id}
This API endpoint is primarily intended for progressing a work request though it's workflow and therefore does not allow workflow steps to be skipped.
Adding Comments
The article Create and Retrieve Work Request Comments describes how to add a Supporting Information comment to a work request.
Progress Status
A typical work request integration requirement is to progress the status of the work request from the current status to the next. Note that some status progressions are controlled by the assoiciated work order and therefore the work order REST API's are used to progress the work request. Progressing the work request status may require additional information to be provided to allow the progression, such as setting the asset associated with the request
Use the 'WorkRequestStatusId' key to set the status, using the integer Id of the status. Refer to the status Id list in the article Get Request Details.
The example below is a partial payload illustrating setting the work request status Id to 8 ('Cancelled')
"WorkRequestStatusId": 8,
Progression to 'In Progress' Status
To progress a work request to the 'In Progress' status (StatusId=4) the Asset REST API PUT /api/v2/workorder/{id} or POST /api/v2/workorder is used. By linking the work request to the work order the work request status is automatically set to 'In Progress'